<? $page_title='库存单据' ?>
<?include "FASHION/page_header.phtml"?>
<script language="JavaScript" src="<{$root}>/util/datepicker/WdatePicker.js"></script>

<form method="get"><nobr>
	单号：<input type="text" name="sno" value="<?= fetch_a_string('sno') ?>" size="12" />
	&nbsp; 时间自：
	<input type="text" class="wdate" id="from" name="from" size="10" value="<?= fetch_a_string('from')?>"
		   onfocus="WdatePicker({onpicked:function(){$dp.$('to').focus();},maxDate:'#F{$dp.$D(\'to\')}'})" readonly />
	至 <input type="text" class="wdate" id="to" name="to" size="10" value="<?= fetch_a_string('to')?>"
		   onfocus="WdatePicker({minDate:'#F{$dp.$D(\'from\')}'})" readonly />
	&nbsp; <?= Html::options2(array(
			'tips'	=> '-- 类型 --',
			'data'	=> $types,
			'name'	=> 'type',
			'val'	=>	fetch_a_int('type'),
		)) ?>
	&nbsp; <?= htmlutil::users_select('user_id', '-- 申请人 --') ?>
	&nbsp; <input type="submit" value="搜索" />
</nobr></form>

<table border=0 class="list" width="100%" id="stuff_list"><tbody>
	<tr class="nobg">
		<th>制单时间</th>
		<th>单号</th>
		<th>类型</th>
		<th>金额</th>
		<th>制单人</th>
		<th>生效</th>
		<th>库房</th>
		<th>采购单</th>
		<th>操作</th>
	</tr>
<{if $list}>
<{foreach item=bound from=$list}>
	<tr>
		<td><{if $bound.addtime}><{= date('Y-m-d H:i',$bound.addtime)}><{/if}></td>
		<td><{$bound.sno}></td>
		<td><?= BoundHelper::type2txt($bound.type) ?></td>
		<td class="fnum"><{$bound.total}></td>
		<td><{$bound.user_name}></td>
		<td><{if $bound.effect}>是<{else}>否<{/if}></td>
		<td><{$bound.warehouse}></td>
		<td><{$bound.indent_sno}></td>
		<td><a href="<? url("{$bound['class']}bound-view/id/{$bound['id']}") ?>">查看</a></td>
	</tr>
<{/foreach}>
<{/if}>
</tbody></table>

<? Html::pager($pager); ?>

<?include "FASHION/page_footer.phtml"?>
